<?php
namespace App\Exceptions;

use Exception;

class AuthorizationException extends Exception {
    protected $message = 'Authorization failed';
    protected $code = 403;
    
    public function __construct($message = null) {
        if ($message !== null) {
            $this->message = $message;
        }
        parent::__construct($this->message, $this->code);
    }
}